package ui;

import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;


public class TitlePanel extends ImagePanel {

	public TitlePanel() {
		setOpaque(true);
		try {
			setImage(ImageIO.read(new File("image/menubutton.jpg")));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
		JLabel title = new JLabel();
		title.setFont(new Font("Tahoma", 1, 30));
		title.setForeground(new Color(30, 144, 255));
		title.setText("Настройка новой игры");
		BoxLayout boxTitle = new BoxLayout(this, BoxLayout.Y_AXIS);
		setLayout(boxTitle);
		title.setAlignmentX(Component.CENTER_ALIGNMENT);
		add(title);
	}

}
